package com.lu.service.impl;

import com.lu.dao.GoodsDao;
import com.lu.dao.impl.GoodsDaoImpl;
import com.lu.pojo.Goods;
import com.lu.pojo.Page;
import com.lu.service.GoodsService;

import java.util.List;

public class GoodsServiceImpl implements GoodsService {
    GoodsDao goodsDao = new GoodsDaoImpl();
    @Override
    public List<Goods> getAllGoods() {
        return goodsDao.getAllGoods();
    }

    @Override
    public List<Goods> getSomeGoodsByUid(int uid) {
        return goodsDao.getSomeGoodsByUid(uid);
    }

    @Override
    public List<Goods> getSomeGoodsByPage(Page page) {
        return goodsDao.getSomeGoodsByPage(page);
    }

    @Override
    public int getCountGoods() {
        return goodsDao.getCountGoods();
    }

    @Override
    public Goods getOneGoodsById(int gid) {
        return goodsDao.getOneGoodsById(gid);
    }

    @Override
    public int addOneGoods(Goods goods) {
        return goodsDao.addOneGoods(goods);
    }

    @Override
    public int updateOneGoods(Goods goods) {
        return goodsDao.updateOneGoods(goods);
    }

    @Override
    public int delOneGoods(int gid) {
        return goodsDao.delOneGoods(gid);
    }

    @Override
    public int updateSell(Goods goods) {
        return goodsDao.updateSell(goods);
    }
}
